/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.mail.manage.service.processor.create;

import info.peigen.hotpot.common.service.base.processor.Processor;
import info.peigen.hotpot.common.service.base.processor.ProcessorServiceContext;
import info.peigen.hotpot.component.mail.domain.MailTemplate;
import info.peigen.hotpot.component.mail.manage.service.processor.AbstractMailTemplateServiceProcessor;
import org.noear.solon.annotation.Component;

/**
 * <b>(MailTemplateCreateProcessor)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2023/1/6
 */
@Component
public class MailTemplateCreateProcessor extends AbstractMailTemplateServiceProcessor implements Processor {
    @Override
    public Integer level() {
        return 20;
    }

    @Override
    public void execute(ProcessorServiceContext serviceContext) {
        MailTemplate mailTemplate = MailTemplate.create(serviceContext);
        serviceContext.setDomain(mailTemplate);
    }
}